package com.a.ims.service.impl;

import com.a.ims.entity.Card;
import com.a.ims.entity.CardSelect;
import com.a.ims.entity.Cardmate;
import com.a.ims.mapper.CardMapper;

import com.a.ims.service.CardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class CardServiceImpl implements CardService {

    private final CardMapper cardMapper;
    @Autowired
    public CardServiceImpl(CardMapper cardMapper) {this.cardMapper = cardMapper;}

    @Override
    public List<Card> selectCard(CardSelect cardSelect) {
        return cardMapper.selectCard(cardSelect);
    }

    @Override
    public int insertCard(Card card) {
        return cardMapper.insertCard(card);
    }

    @Override
    public int deleteCard(Integer cardId) {
        return cardMapper.deleteCard(cardId);
    }

    @Override
    public int toggleSaleStatus(Card card) {
        return cardMapper.toggleSaleStatus(card);
    }

    @Override
    public List<Cardmate> selectCardmate(Cardmate cardmate) {
        return cardMapper.selectCardmate(cardmate);
    }

    @Override
    public List<String> selectWarehouseName(String warehouseName) {
        return cardMapper.selectWarehouseName(warehouseName);
    }

}
